write_file <- function(
  file_name = "test.txt",
  contents = c("test", "text"),
  sep = "\n",
  useBytes = T,
  trans = F,
  en_coding = "UTF-8"
){
  write("", file = file_name)
  if(trans){
    writeLines(iconv(x = contents, to = en_coding), 
               con = file_name ,sep = sep, useBytes = useBytes)
  }else{
    writeLines(contents, 
               con = file_name ,sep = sep, useBytes = useBytes)
  }
}